/**
 * @Project Name:hoofungson-life
 * @Package Name:cn.hoofungson.life.core.model.entity.user
 * @Since JDK 1.8
 */
package cn.hoofungson.blog.business.service.provider.model.entity.user;

import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * @Description: 登录日志
 * @Author 胡松 hoofungson@163.com
 * @Date 2017-12-21 14:07
 * @Version V1.0
 */
@Data
@NoArgsConstructor
@Entity
@Table(name = "hb_login_log")
public class LoginLogPO implements Serializable {

    @Id
    @GenericGenerator(name = "login_log_generator", strategy = "increment")
    @GeneratedValue(strategy = GenerationType.IDENTITY, generator = "login_log_generator")
    private Long id;
    @OneToOne(cascade = CascadeType.ALL)
    @JoinColumn(name = "user", unique = true)
    private UserPO userPO;
    @Column(name = "ip")
    private String ip;
    @Column(name = "login_time")
    private Date loginTime;
}
